<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DivBean
 *
 * @author jhonny
 */
class DivTag {
    private $component;
    private $class;
    private $id;
    public function __construct() {
    }
    public function getComponent() {
        return $this->component;
    }

    public function setComponent($component) {
        $this->component = $component;
    }

    public function getClass() {
        return $this->class;
    }

    public function setClass($class) {
        $this->class = $class;
    }
    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }

    
    public function getComponentToString() {
        $value='';
        if($this->getComponent()!=null){
            $value.=$this->getComponent()->toString();
        }
        return $value;
    }
    
    public function toString() {
        $value='';
        $value.='<div ';
        if($this->getClass()!=null){
            $value.='class="'.$this->getClass().'"';
        }else if($this->getId()!=null){
            $value.='id="'.$this->getId().'"';
        }
        $value.='>
';
        $value.=$this->getComponentToString();
        $value.='</div>
';
        return $value;
    }
}
?>
